import Vue from 'vue'
import App from './App.vue'
import store from './store'
import router from './router'

import {
    Popup,
    Toast,
    Search,
    Grid,
    GridItem,
    Card,
    Stepper,
    Button,
    Row,
    Col,
    CellGroup,
    Checkbox,
    CheckboxGroup,
    Cell,
    Empty,
    Divider,
    Dialog,
    Cascader,
    Rate,
    GoodsAction,
    GoodsActionButton,
    GoodsActionIcon,
    Sku,
    Image
} from 'vant';
import common from "./utils/common"
Vue.use(Image)
Vue.use(GoodsActionButton)
Vue.use(GoodsActionIcon)
Vue.use(Sku)
Vue.use(GoodsAction)
Vue.use(Rate)
Vue.use(Cascader)
Vue.use(Popup)
Vue.use(Empty)
Vue.use(Cell)
Vue.use(Row)
Vue.use(Col)
Vue.use(Dialog)
Vue.use(Stepper)
Vue.use(Grid)
Vue.use(Card)
Vue.use(GridItem)
Vue.use(Toast);
Vue.use(Search);
Vue.use(Button)
Vue.use(Divider)
Vue.use(Checkbox)
Vue.use(CellGroup)
Vue.use(CheckboxGroup)

Vue.prototype.baseUrl = process.env.VUE_APP_APIDOMAINNAME
Vue.prototype.utils = common
Vue.config.productionTip = false
// 初始化样式
import "@/assets/css/reset.css";

// 设置html根字体大小
import "@/assets/css/font_html.css";


// 导入vant css(由于采用配置主题方式，这里需要导入vant less 主题文件,如果不需要自定义主题注释下面代码，然后解除config/cdn.js 中vant主题样式的注释)
//import 'vant/lib/index.css';
import "vant/lib/index.less";

import "@/icons";

// mock模式
if (process.env.VUE_APP_MODE == "mock") {
    require("../mock");
    console.log("本地mock数据已导入");
}

Vue.prototype.APIDomainName = process.env.VUE_APP_APIDOMAINNAME

new Vue({
    store,
    router,
    render: h => h(App),
}).$mount('#app')
